#include "admin.h"
#include "adminlogin.h"
#include "system.h"
#include "ui_adminlogin.h"
#include <QDebug>
AdminLogin::AdminLogin(QWidget* parent) :
    QWidget(parent),
    ui(new Ui::AdminLogin)
{
    ui->setupUi(this);
}

AdminLogin::~AdminLogin()
{
    delete ui;
}

void AdminLogin::on_pushButtonLogin_clicked()
{
    qDebug() << "确定按钮被点击了";
    QString username = ui->AccountNumber->text();
    QString passwd = ui->Password->text();
    if(username == "admin" && passwd == "123456")
    {
        qDebug() << "登录成功！！！";
        Admin* m = new Admin();
        m->show();
        this->close();
    }
    else
    {
        qDebug() << "登录失败！！！";
    }

    qDebug() << ui->AccountNumber->text();
    qDebug() << ui->Password->text();
}


void AdminLogin::on_pushButtonEnroll_clicked()
{
    System* m = new System();
    m->show();
    this->close();
}
